package com.huike.mapper.system;

import com.huike.pojo.SysDept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysDeptMapper {

    List<SysDept> selectDeptList(SysDept dept);

    SysDept selectDeptById(Long deptId);

    Integer hasChildByDeptId(Long deptId);

    Integer checkDeptExistUser(Long deptId);

    void deleteByDeptId(Long deptId);
    @Select("select * from sys_dept where deptname = # {deptName}")
    SysDept getByDeptname(String deptName);

    void save(SysDept sysDept);
}
